package com.yctan.base.utils.exception;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Date 2018/8/23 14:21
 * @Description
 */
public enum Log4jInfo {
    HEAD(nowDate()),;
    private String message;

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    Log4jInfo(String message) {
        this.message = message;
    }

    /**
     * 获取当前时间转换为yyyy-MM-dd 类型
     *
     * @return java.lang.String
     */
    private static String nowDate() {
        Date date = new Date();
        DateFormat dateFormat = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss");
        return "提示消息:" + dateFormat.format(date);
    }
}
